{extend name="common@create" /}
{block name="formaa"}

	<form action="/category" method="POST" class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>权限名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="显示的名称" id="title" name="title">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">所属权限：</label>
			<div class="formControls col-xs-8 col-sm-9 f-l">
				<span class="select-box f-l" style="width:180px;">
				{php} $ctp = getCategory();{/php}
				<select class="select" id="pidt" name="pid" size="1" required>
					<option value="">--请选择父级权限--</option>
					{volist name="$ctp" id="vo"}
						<option value="{$vo.id}">{$vo.title}</option>
					{/volist}
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">排序：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="默认为999" id="paixu" name="paixu">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
{/block}
{block name="yanzheng"}
<script type="text/javascript">
	// 匹配用户名
	$.validator.addMethod("zh",function(value,element){
		var tel = /^[\u4e00-\u9fa5]*$/;
		return this.optional(element) || tel.test(value);
	}, "请输入中文");

	// 匹配帐号
	$.validator.addMethod("ustr",function(value,element){
		var tel = /^[a-zA-Z\/]*$/;
		return this.optional(element) || tel.test(value);
	}, "由字母和 / 组成");

	// 设置表单验证规则
	var myrules = {
			title:{
				required:true,
				zh:true,
				rangelength:[2,50]
			},
			paixu:{
				digits:true,
				max:999
			},
		};

	// 设置表单提交方式
	var mytype = 'POST';
</script>
{/block}